package com.congapp.modelo;

import com.congapp.R;
import com.congapp.util.ValidadorCorreo;
import com.mobandme.ada.Entity;
import com.mobandme.ada.annotations.CustomValidation;
import com.mobandme.ada.annotations.RegularExpressionValidation;
import com.mobandme.ada.annotations.Table;
import com.mobandme.ada.annotations.TableField;

/**
 * Created by Reactiva on 13/09/2014.
 */
@Table(name = "USUARIO")
public class Usuario extends EntidadBase {

    @TableField(name = "NOMBRE", datatype = Entity.DATATYPE_TEXT)
    private String nombre;

    @TableField(name = "APELLIDO", datatype = Entity.DATATYPE_TEXT)
    private String apellido;

    //@Databinding(ViewId = R.id.correo)
    //@CustomValidation(validator = ValidadorCorreo.class, messageResourceId = R.string.correo_incorrecto)
    @TableField(name = "CORREO", datatype = Entity.DATATYPE_TEXT)
    private String correo;

    //@Databinding(ViewId = R.id.nombre)
    //@RegularExpressionValidation(expression = "[a-zA-Z0-9]*", messageResourceId = R.string.nombre_requerido)
    @TableField(name = "CONTRASENA", datatype = Entity.DATATYPE_TEXT)
    private String contrasena;




/*@Databinding(ViewId = R.id.EmployeeName)
    @RequiredFieldValidation(messageResourceId = R.string.validiomMessageEmployeeNameRequired)
    @RegularExpressionValidation(expression = "[a-z]*", messageResourceId = R.string.validiomMessageEmployeeNameFormat)
    private String name = null;

    @Databinding(ViewId = R.id.EmployeeSurname)
    @RequiredFieldValidation(messageResourceId = R.string.validiomMessageEmployeeSurnameRequired)
    private String surname = null;

    @Databinding(ViewId = R.id.EmployeeAge)
    @RequiredFieldValidation(messageResourceId = R.string.validiomMessageEmployeeAgeRequired)
    @RangeValidation(minValue = 1, maxValue = 99, messageResourceId = R.string.validiomMessageEmployeeAgeRange)
    private Integer age = null;

    @Databinding(ViewId = R.id.EmployeeEmail)
    @CustomValidation(validator = EmailValidator.class, messageResourceId = R.string.validiomMessageEmployeeEmailFormat)
    private String email = null;

    @Databinding(ViewId = R.id.EmployeeActive)
    private Boolean active = null;*/
}
